package com.platform.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.platform.dao.FarmTypeMapper;
import com.platform.entity.FarmTypeEntity;


/**
 * 农机类型表一级Service实现类
 *
 * @author lipengjun
 * @email 939961241@qq.com
 * @date 2020-02-10 21:58:37
 */
@Service("farmTypeService")
public class FarmTypeService{
    @Autowired
    private FarmTypeMapper farmTypeMapper;

    
    public FarmTypeEntity queryObject(Integer id) {
        return farmTypeMapper.selectByPrimaryKey(id);
    }

    
    public List<FarmTypeEntity> queryList(Map<String, Object> map) {
        return farmTypeMapper.queryList(map);
    }

    
    public int queryTotal(Map<String, Object> map) {
        return farmTypeMapper.queryTotal(map);
    }

   
    public int save(FarmTypeEntity farmType) {
        return farmTypeMapper.insertSelective(farmType);
    }

    
    public int update(FarmTypeEntity farmType) {
        return farmTypeMapper.updateByPrimaryKeySelective(farmType);
    }

    
    public int delete(Integer id) {
        return farmTypeMapper.deleteByPrimaryKey(id);
    }

    
    public int deleteBatch(Integer[] ids) {
        return farmTypeMapper.deleteBatch(ids);
    }
}
